function(ss_micro_cache_mittest case)
  mit_shared_storage_unittest(${case})
  target_compile_definitions(${case} PRIVATE UNITTEST_DEBUG)
  target_link_libraries(${case} PRIVATE observer_test)
  if (case MATCHES "^test_.*")
    set_tests_properties(${case} PROPERTIES TIMEOUT 600)
  endif()
endfunction()

if(OB_BUILD_CLOSE_MODULES)
  ss_micro_cache_mittest(test_ss_ckpt_phy_block)
  ss_micro_cache_mittest(test_ss_mem_block_manager)
  ss_micro_cache_mittest(test_ss_physical_block_manager)
  ss_micro_cache_mittest(test_ss_micro_meta_manager)
  ss_micro_cache_mittest(test_ss_micro_range_manager)
  ss_micro_cache_mittest(test_ss_micro_cache_util)
  ss_micro_cache_mittest(test_ss_micro_cache_struct)
  ss_micro_cache_mittest(test_ss_micro_cache_stat)
  ss_micro_cache_mittest(test_ss_micro_cache_task_runner)
  ss_micro_cache_mittest(test_ss_micro_cache_io_helper)
  ss_micro_cache_mittest(test_ss_micro_cache_basic_op)
  ss_micro_cache_mittest(test_ss_micro_cache)
  ss_micro_cache_mittest(test_ss_micro_cache_restart)
  ss_micro_cache_mittest(test_ss_micro_cache_resize)
  ss_micro_cache_mittest(test_ss_micro_cache_small_file_size)
  ss_micro_cache_mittest(test_ss_micro_cache_huge_data)
  ss_micro_cache_mittest(test_ss_micro_cache_random_size)
  ss_micro_cache_mittest(test_ss_micro_cache_parallelism)
  ss_micro_cache_mittest(test_ss_micro_cache_abnormal_case)
  ss_micro_cache_mittest(test_ss_micro_cache_eviction)
  ss_micro_cache_mittest(test_ss_micro_cache_evict_persisted_meta)
  ss_micro_cache_mittest(test_ss_micro_cache_check_prewarm)
  ss_micro_cache_mittest(test_ss_execute_checkpoint_task)
  ss_micro_cache_mittest(test_ss_batch_micro_checkpoint)
  ss_micro_cache_mittest(test_ss_persist_micro_data_task)
  ss_micro_cache_mittest(test_ss_persist_micro_meta_task)
  ss_micro_cache_mittest(test_ss_reorganize_phy_block)
  ss_micro_cache_mittest(test_ss_handle_arc_seg_op)
  ss_micro_cache_mittest(test_ss_micro_cache_upgrade)
endif()
